{extend name="public/layout" /}
{block name="head_css"}
    <link rel="stylesheet" href="/static/home/css/member.css?v={$version}">
{/block}
{block name="main"}

    <!-- 中间内容区域 -->
    <div class="content-area middle-content inline-box">
        {include file='user/member_left_nav'/}

        <div class="right-content-box inline-block" style="vertical-align: top">
            <div class="content-list-box">
                <div class="tab-title-line inline-box">
                    <a href="{:url('index',array('type'=>1))}" class="tab-item {if $type eq 1}chosen{/if} inline-block">需求信息</a>
                    <a href="{:url('index',array('type'=>2))}" class="tab-item {if $type eq 2}chosen{/if} inline-block">图片</a>
                    <a href="{:url('index',array('type'=>3))}" class="tab-item {if $type eq 3}chosen{/if} inline-block">小视频</a>
                    <a href="{:url('index',array('type'=>4))}" class="tab-item {if $type eq 4}chosen{/if} inline-block">隔音方案</a>
                </div>
                {if $type eq 1}
                    {include file='user/engineering_list'/}
                {elseif $type eq 2}
                    {include file='user/pic_list'/}
                {elseif $type eq 3}
                    {include file='user/video_list'/}
                {else}
                    {include file='user/program_list'/}
                {/if}
            </div>

            <!-- 分页 -->
            <nav aria-label="Page navigation" class="page-box">
                {$list->render()}
            </nav>
            <!-- 分页 END -->
        </div>
    </div>
{/block}
{block name="script"}
    <script>
        function del(url,id){
            if(confirm('是否确认删除？')){
                var obj = new Object();
                obj.id = id;
                $.post(url,obj,function(data) {
                    if(data.code == 1){
                        alert('删除成功！');
                        window.location.reload();
                    }else{
                        alert('删除失败！');
                    }
                })
            }
        }
    </script>
{/block}